package com.module.codeBind.schedule;

import java.util.Date;
import java.util.Timer;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;


public class OpenBatchListener implements ServletContextListener {   
    
    public void contextDestroyed(ServletContextEvent sce) {
    	//server.close();
    }   
  
    public void contextInitialized(ServletContextEvent sce) {   
    	Timer timer = new Timer(); 
    	OpenBatchCode obc = new OpenBatchCode();
    	Date date = new Date(); 
    	long timestamp = 12*60*60*1000; 
    	timer.schedule(obc, date, timestamp);       	
    } 
}
